use linkList::LinkList;

fn main() {
    let mut list = LinkList::new();
    list.append(1);
    list.append(2);
    list.append(3);
    list.prepend(5);
    list.prepend(4);
    println!("{}", list);
    list.reverse();
    println!("{}", list);

    let mut list1 = LinkList::new();
    list1.append(10);
    list1.append(20);
    list1.append(30);
    list1.prepend(50);
    list1.prepend(40);
    println!("{}", list1);

    // list += list1;
    // println!("{}", list);

    let list2 = list + list1;
    println!("{}", list2);

    let mut a = list2.iter();
    println!("{:?}", a.next());
    println!("{:?}", a.next());
    println!("{:?}", a.next());
}
